<?php

namespace app\api\Validate;

use think\Validate;

/**
 * 求职个人培训表
 */
class CultivateValidate extends Validate
{
    protected $rule = [
        'id' => 'require',
        'name' => 'require',
        'specialty' => 'require',
        'craft' => 'require',
        'cultivateDate' => 'require',
        'issueDate' => 'require',
        'makeDate' => 'require',
        'schoolDate' => 'require',
        'content' => 'require',
        'succeedimage' => 'require',
        'certificationimage' => 'require',


    ];
    protected $message = [
        'name.require'  => '培训学校不能为空',
        'id.require'  => '信息未找到',
        'specialty.require'  => '专业不能为空',
        'craft.require'  => '工种名称不能为空',
        'cultivateDate.require'  => '培训时间不能为空',
        'issueDate.require'  => '证书颁发时间不能为空',
        'makeDate.require'  => '预约时间不能为空',
        'schoolDate.require'  => '开课时间不能为空',
        'content.require'  => '个人简介不能为空',
        'succeedimage.require'  => '合格证书不能为空',
        'certificationimage.require'  => '资质证书不能为空',
    ];
    protected $scene = [
        'add' => [
            'name',
            'specialty',
            'craft',
            'cultivateDate',
            'issueDate',
            // 'makeDate',
            // 'schoolDate',
            'content',
            'succeedimage',
            'certificationimage',

        ],
        'save' => [
            'id',
            'name',
            'specialty',
            'craft',
            'cultivateDate',
            'issueDate',
            'makeDate',
            'schoolDate',
            'content',
            'succeedimage',
            'certificationimage',
        ],
    ];
}